#region license
# This file is part of Grawlix.
# 
# Grawlix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# 
# Grawlix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public
# License along with Grawlix.  If not, see
# <http://www.gnu.org/licenses/>.
#endregion

"""Shared objects for equality testing."""

namespace Grawlix.Meta.Tests.Equality
import Grawlix.Meta

final class A:
	public val as int
	
	[Equality(OverloadOperators: true)]
	private def Equality(rhs as A):
		return val == rhs.val

	[Equality(OverloadOperators: true)]
	private def Equality(rhs as D):
		return val == rhs.val
	
	[Equality(OverloadOperators: true)]
	private def Equality(rhs as W):
		return val == rhs.val

	[Equality(OverloadOperators: true)]
	private def Equality(rhs as Z):
		return val == rhs.val

final class B:
	public val as int
	
	[Equality(OverloadOperators: true)]
	private def Equality(rhs as B):
		return val == rhs.val

final class C:
	public val as int
	
	[Equality(OverloadOperators: true)]
	private def Equality(rhs as W):
		return val == rhs.val

final class D:
	public val as int

struct W:
	public val as int
	
	[Equality]
	private def Equality(rhs as D):
		return val == rhs.val
	
	[Equality]
	private def Equality(rhs as W):
		return val == rhs.val

	[Equality]
	private def Equality(rhs as Z):
		return val == rhs.val

struct X:
	public val as int
	
	[Equality]
	private def Equality(rhs as X):
		return val == rhs.val

struct Y:
	public val as int
	
	[Equality]
	private def Equality(rhs as A):
		return val == rhs.val

struct Z:
	public val as int

